Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Side by Side Diff: chrome/content/tests/ui/icon_position.js

Issue 5745141503492096: Issue 1561 - Move unit tests out of the browser`s content area (Closed)
Patch Set: Addressed comment Created Nov. 17, 2014, 6:57 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « chrome/content/tests/popupBlocker.js ('k') | chrome/locale/en-US/harness.dtd » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 (function() 1 (function()
2 { 2 {
3 let {application} = require("info"); 3 let {application} = require("info");
4 if (application != "firefox") 4 if (application != "firefox")
5 return; 5 return;
6 6
7 let CustomizableUI = null; 7 let CustomizableUI = null;
8 let usingShim = false; 8 let usingShim = false;
9 try 9 try
10 { 10 {
11 ({CustomizableUI}) = Cu.import("resource:///modules/CustomizableUI.jsm", nul l); 11 ({CustomizableUI}) = Cu.import("resource:///modules/CustomizableUI.jsm", nul l);
12 } 12 }
13 catch (e) 13 catch (e)
14 { 14 {
15 usingShim = true; 15 usingShim = true;
16 // No built-in CustomizableUI API, use our own implementation. 16 // No built-in CustomizableUI API, use our own implementation.
17 ({CustomizableUI}) = require("customizableUI"); 17 ({CustomizableUI}) = require("customizableUI");
18 } 18 }
19 19
20 let wnd = Utils.getChromeWindow(window); 20 let wnd = UI.currentWindow;
21 let defaultParent = require("appSupport").defaultToolbarPosition.parent; 21 let defaultParent = require("appSupport").defaultToolbarPosition.parent;
22 22
23 let toolbox; 23 let toolbox;
24 if (usingShim) 24 if (usingShim)
25 { 25 {
26 let toolbar = wnd.document.getElementById(defaultParent); 26 let toolbar = wnd.document.getElementById(defaultParent);
27 if (!toolbar) 27 if (!toolbar)
28 return; 28 return;
29 toolbox = toolbar.toolbox; 29 toolbox = toolbar.toolbox;
30 } 30 }
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 ok(!placement, "Button is invisible"); 86 ok(!placement, "Button is invisible");
87 87
88 UI.toggleToolbarIcon(); 88 UI.toggleToolbarIcon();
89 placement = CustomizableUI.getPlacementOfWidget("abp-toolbarbutton"); 89 placement = CustomizableUI.getPlacementOfWidget("abp-toolbarbutton");
90 ok(placement, "Button is visible"); 90 ok(placement, "Button is visible");
91 if (placement) 91 if (placement)
92 equal(placement.area, CustomizableUI.AREA_NAVBAR, "Button is at default po sition"); 92 equal(placement.area, CustomizableUI.AREA_NAVBAR, "Button is at default po sition");
93 }); 93 });
94 94
95 })(); 95 })();
OLDNEW
« no previous file with comments | « chrome/content/tests/popupBlocker.js ('k') | chrome/locale/en-US/harness.dtd » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld