Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(87)

Side by Side Diff: chrome/test/data/extensions/api_test/tabs/basics/crud.html

Issue 7044071: Rewrite BrowserTest.PageLanguageDetection to use a new tab instead of the one with about:blank. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/renderer/chrome_render_view_observer.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <script src="tabs_util.js"></script> 1 <script src="tabs_util.js"></script>
2 2
3 <script> 3 <script>
4 var firstWindowId; 4 var firstWindowId;
5 5
6 chrome.test.runTests([ 6 chrome.test.runTests([
7 function getSelected() { 7 function getSelected() {
8 chrome.tabs.getSelected(null, pass(function(tab) { 8 chrome.tabs.getSelected(null, pass(function(tab) {
9 assertEq(location.href, tab.url); 9 assertEq(location.href, tab.url);
10 assertEq(location.href, tab.title); 10 assertEq(location.href, tab.title);
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 })); 85 }));
86 }, 86 },
87 87
88 function getAllInWindowNullArg() { 88 function getAllInWindowNullArg() {
89 chrome.tabs.getAllInWindow(null, pass(function(tabs) { 89 chrome.tabs.getAllInWindow(null, pass(function(tabs) {
90 assertEq(5, tabs.length); 90 assertEq(5, tabs.length);
91 assertEq(firstWindowId, tabs[0].windowId); 91 assertEq(firstWindowId, tabs[0].windowId);
92 })); 92 }));
93 }, 93 },
94 94
95 /* Sadly, this has also regressed. crbug.com/60802.
96 function detectLanguage() { 95 function detectLanguage() {
97 chrome.tabs.getAllInWindow(firstWindowId, pass(function(tabs) { 96 chrome.tabs.getAllInWindow(firstWindowId, pass(function(tabs) {
98 chrome.tabs.detectLanguage(tabs[0].id, pass(function(lang) { 97 chrome.tabs.detectLanguage(tabs[0].id, pass(function(lang) {
99 assertEq("en", lang); 98 assertEq("und", lang);
100 })); 99 }));
101 })); 100 }));
102 }, 101 },
103 */
104 102
105 function windowCreate() { 103 function windowCreate() {
106 chrome.windows.create({type: "popup"}, pass(function(window) { 104 chrome.windows.create({type: "popup"}, pass(function(window) {
107 assertEq("popup", window.type); 105 assertEq("popup", window.type);
108 assertTrue(!window.incognito); 106 assertTrue(!window.incognito);
109 })); 107 }));
110 chrome.windows.create({incognito: true}, pass(function(window) { 108 chrome.windows.create({incognito: true}, pass(function(window) {
111 // This extension is not incognito-enabled, so it shouldn't be able to 109 // This extension is not incognito-enabled, so it shouldn't be able to
112 // see the incognito window. 110 // see the incognito window.
113 assertEq(null, window); 111 assertEq(null, window);
114 })); 112 }));
115 }, 113 },
116 114
117 /* Disabled -- see http://bugs.chromium.org/58229. 115 /* Disabled -- see http://bugs.chromium.org/58229.
118 function windowSetFocused() { 116 function windowSetFocused() {
119 chrome.windows.getCurrent(function(oldWin) { 117 chrome.windows.getCurrent(function(oldWin) {
120 chrome.windows.create({}, function(newWin) { 118 chrome.windows.create({}, function(newWin) {
121 assertTrue(newWin.focused); 119 assertTrue(newWin.focused);
122 chrome.windows.update(oldWin.id, {focused:true}); 120 chrome.windows.update(oldWin.id, {focused:true});
123 chrome.windows.get(oldWin.id, pass(function(oldWin2) { 121 chrome.windows.get(oldWin.id, pass(function(oldWin2) {
124 assertTrue(oldWin2.focused); 122 assertTrue(oldWin2.focused);
125 })); 123 }));
126 }); 124 });
127 }); 125 });
128 }, 126 },
129 */ 127 */
130 ]); 128 ]);
131 </script> 129 </script>
OLDNEW
« no previous file with comments | « chrome/renderer/chrome_render_view_observer.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698