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

Side by Side Diff: chrome/test/data/extensions/api_test/webnavigation/test_getFrame.html

Issue 10826157: Check for warnings when loading extensions in browser tests. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix ExtensionTerminalPrivateApiTest.TerminalTest Created 8 years, 4 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
OLDNEW
1 <script> 1 <script src="test_getFrame.js"></script>
2 var URL = chrome.extension.getURL("getFrame/a.html");
3 var tabId = -1;
4 var processId = -1;
5
6 chrome.test.runTests([
7 function testGetFrame() {
8 chrome.tabs.create({"url": "about:blank"}, function(tab) {
9 tabId = tab.id;
10 var done = chrome.test.listenForever(
11 chrome.webNavigation.onCommitted,
12 function (details) {
13 if (details.tabId != tabId)
14 return;
15 if (details.url != URL)
16 return;
17 processId = details.processId;
18 chrome.webNavigation.getFrame(
19 {tabId: tabId, frameId: 0, processId: processId},
20 function(details) {
21 chrome.test.assertEq({errorOccurred: false, url: URL},
22 details);
23 done();
24 });
25 });
26 chrome.tabs.update(tabId, {url: URL});
27 });
28 },
29
30 function testGetInvalidFrame() {
31 chrome.webNavigation.getFrame(
32 {tabId: tabId, frameId: 1, processId: processId},
33 function (details) {
34 chrome.test.assertEq(null, details);
35 chrome.test.succeed();
36 });
37 },
38
39 function testGetAllFrames() {
40 chrome.webNavigation.getAllFrames(
41 {tabId: tabId},
42 function (details) {
43 chrome.test.assertEq(
44 [{errorOccurred: false,
45 frameId: 0,
46 processId: processId,
47 url: URL}],
48 details);
49 chrome.test.succeed();
50 });
51 }
52 ]);
53 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698