+function() {
+page.open(url, function(status) {
+ // set the phrase
+ var expected = "1Nq2Wmu726XHCuGhctEtGmhxo3wzk5wZ1H";
+ page.evaluate(function() {
+ $(".phrase").val("abandon abandon ability");
+ $(".phrase").trigger("input");
+ });
+ waitForGenerate(function() {
+ // change the bip44 purpose field to 45
+ page.evaluate(function() {
+ $("#bip44 .account").val("1");
+ $("#bip44 .account").trigger("input");
+ });
+ waitForGenerate(function() {
+ // check the address for the new derivation path
+ var actual = page.evaluate(function() {
+ return $(".address:first").text();
+ });
+ if (actual != expected) {
+ console.log("BIP44 account field generates incorrect address");
+ console.log("Expected: " + expected);
+ console.log("Actual: " + actual);
+ fail();
+ }
+ next();
+ });
+ });
+});
+},
+
+// BIP44 change field changes address list
+function() {
+page.open(url, function(status) {
+ // set the phrase
+ var expected = "1KAGfWgqfVbSSXY56fNQ7YnhyKuoskHtYo";
+ page.evaluate(function() {
+ $(".phrase").val("abandon abandon ability");
+ $(".phrase").trigger("input");
+ });
+ waitForGenerate(function() {
+ // change the bip44 purpose field to 45
+ page.evaluate(function() {
+ $("#bip44 .change").val("1");
+ $("#bip44 .change").trigger("input");
+ });
+ waitForGenerate(function() {
+ // check the address for the new derivation path
+ var actual = page.evaluate(function() {
+ return $(".address:first").text();
+ });
+ if (actual != expected) {
+ console.log("BIP44 change field generates incorrect address");
+ console.log("Expected: " + expected);
+ console.log("Actual: " + actual);
+ fail();
+ }
+ next();
+ });
+ });
+});
+},