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

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

Issue 10835033: Only delete old frames when a new main frame navigation commits (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: updates 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>
2 var URL = chrome.extension.getURL("getFrame/a.html"); 2 var URL = chrome.extension.getURL("getFrame/a.html");
3 var tabId = -1; 3 var tabId = -1;
4 var processId = -1; 4 var processId = -1;
5 5
6 chrome.test.runTests([ 6 chrome.test.runTests([
7 function testGetFrame() { 7 function testGetFrame() {
8 chrome.tabs.create({"url": "about:blank"}, function(tab) { 8 chrome.tabs.create({"url": "about:blank"}, function(tab) {
9 tabId = tab.id; 9 tabId = tab.id;
10 var done = chrome.test.listenForever( 10 var done = chrome.test.listenForever(
11 chrome.webNavigation.onBeforeNavigate, 11 chrome.webNavigation.onCommitted,
12 function (details) { 12 function (details) {
13 if (details.tabId != tabId) 13 if (details.tabId != tabId)
14 return; 14 return;
15 if (details.url != URL) 15 if (details.url != URL)
16 return; 16 return;
17 processId = details.processId; 17 processId = details.processId;
18 chrome.webNavigation.getFrame( 18 chrome.webNavigation.getFrame(
19 {tabId: tabId, frameId: 0, processId: processId}, 19 {tabId: tabId, frameId: 0, processId: processId},
20 function(details) { 20 function(details) {
21 chrome.test.assertEq({errorOccurred: false, url: URL}, 21 chrome.test.assertEq({errorOccurred: false, url: URL},
(...skipping 22 matching lines...) Expand all
44 [{errorOccurred: false, 44 [{errorOccurred: false,
45 frameId: 0, 45 frameId: 0,
46 processId: processId, 46 processId: processId,
47 url: URL}], 47 url: URL}],
48 details); 48 details);
49 chrome.test.succeed(); 49 chrome.test.succeed();
50 }); 50 });
51 } 51 }
52 ]); 52 ]);
53 </script> 53 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698