| OLD | NEW |
| 1 // tabs api test | 1 // tabs api test |
| 2 // browser_tests.exe --gtest_filter=ExtensionApiTest.Tabs | 2 // browser_tests.exe --gtest_filter=ExtensionApiTest.Tabs |
| 3 | 3 |
| 4 // We have a bunch of places where we need to remember some state from one | 4 // We have a bunch of places where we need to remember some state from one |
| 5 // test (or setup code) to subsequent tests. | 5 // test (or setup code) to subsequent tests. |
| 6 var firstWindowId = null; | 6 var firstWindowId = null; |
| 7 var secondWindowId = null; | 7 var secondWindowId = null; |
| 8 var firstTabIndex = null; | 8 var firstTabIndex = null; |
| 9 var testTabId = null; | 9 var testTabId = null; |
| 10 | 10 |
| (...skipping 330 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 341 // The subsequent three tests all load relative.html, which calls | 341 // The subsequent three tests all load relative.html, which calls |
| 342 // this page's relativePageLoad(), which ends the test. | 342 // this page's relativePageLoad(), which ends the test. |
| 343 function relativeUrlTabsCreate() { | 343 function relativeUrlTabsCreate() { |
| 344 chrome.tabs.create({windowId: firstWindowId, url: 'relative.html'}, | 344 chrome.tabs.create({windowId: firstWindowId, url: 'relative.html'}, |
| 345 function(tab){ | 345 function(tab){ |
| 346 testTabId = tab.id; | 346 testTabId = tab.id; |
| 347 } | 347 } |
| 348 ); | 348 ); |
| 349 }, | 349 }, |
| 350 | 350 |
| 351 /* FIXME: Bug 21851. Make this test item not flaky. |
| 351 function relativeUrlTabsUpdate() { | 352 function relativeUrlTabsUpdate() { |
| 352 chrome.tabs.update(testTabId, {url: "chrome://a/"}, function(tab) { | 353 chrome.tabs.update(testTabId, {url: "chrome://a/"}, function(tab) { |
| 353 chrome.test.assertEq("chrome://a/", tab.url); | 354 chrome.test.assertEq("chrome://a/", tab.url); |
| 354 chrome.tabs.update(tab.id, {url: "relative.html"}, function(tab) { | 355 chrome.tabs.update(tab.id, {url: "relative.html"}, function(tab) { |
| 355 }); | 356 }); |
| 356 }); | 357 }); |
| 357 }, | 358 }, */ |
| 358 | 359 |
| 359 function relativeUrlWindowsCreate() { | 360 function relativeUrlWindowsCreate() { |
| 360 chrome.windows.create({url: "relative.html"}); | 361 chrome.windows.create({url: "relative.html"}); |
| 361 } | 362 } |
| 362 | 363 |
| 363 // TODO(asargent) We still need to add tests for the following: | 364 // TODO(asargent) We still need to add tests for the following: |
| 364 // Methods: | 365 // Methods: |
| 365 // -chrome.tabs.connect | 366 // -chrome.tabs.connect |
| 366 // Events: | 367 // Events: |
| 367 // -chrome.tabs.onAttached | 368 // -chrome.tabs.onAttached |
| 368 // -chrome.tabs.onDetched | 369 // -chrome.tabs.onDetched |
| 369 // | 370 // |
| 370 // Also, it would be an improvement to check the captureVisibleTab results | 371 // Also, it would be an improvement to check the captureVisibleTab results |
| 371 // against a known-good result. | 372 // against a known-good result. |
| 372 ]); | 373 ]); |
| OLD | NEW |