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

Side by Side Diff: chrome/test/data/extensions/api_test/webnavigation/test_requestOpenTab.js

Issue 10815051: Send the correct process ID with webNavigation events (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 5 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 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 function runTests() { 5 function runTests() {
6 var getURL = chrome.extension.getURL; 6 var getURL = chrome.extension.getURL;
7 chrome.tabs.create({"url": "about:blank"}, function(tab) { 7 chrome.tabs.create({"url": "about:blank"}, function(tab) {
8 var tabId = tab.id; 8 var tabId = tab.id;
9 9
10 chrome.test.runTests([ 10 chrome.test.runTests([
11 // Opens a tab and waits for the user to middle-click on a link in it. 11 // Opens a tab and waits for the user to middle-click on a link in it.
12 function requestOpenTab() { 12 function requestOpenTab() {
13 expect([ 13 expect([
14 { label: "a-onBeforeNavigate", 14 { label: "a-onBeforeNavigate",
15 event: "onBeforeNavigate", 15 event: "onBeforeNavigate",
16 details: { frameId: 0, 16 details: { frameId: 0,
17 processId: 0,
17 tabId: 0, 18 tabId: 0,
18 timeStamp: 0, 19 timeStamp: 0,
19 url: getURL('requestOpenTab/a.html') }}, 20 url: getURL('requestOpenTab/a.html') }},
20 { label: "a-onCommitted", 21 { label: "a-onCommitted",
21 event: "onCommitted", 22 event: "onCommitted",
22 details: { frameId: 0, 23 details: { frameId: 0,
24 processId: 0,
23 tabId: 0, 25 tabId: 0,
24 timeStamp: 0, 26 timeStamp: 0,
25 transitionQualifiers: [], 27 transitionQualifiers: [],
26 transitionType: "typed", 28 transitionType: "typed",
27 url: getURL('requestOpenTab/a.html') }}, 29 url: getURL('requestOpenTab/a.html') }},
28 { label: "a-onDOMContentLoaded", 30 { label: "a-onDOMContentLoaded",
29 event: "onDOMContentLoaded", 31 event: "onDOMContentLoaded",
30 details: { frameId: 0, 32 details: { frameId: 0,
33 processId: 0,
31 tabId: 0, 34 tabId: 0,
32 timeStamp: 0, 35 timeStamp: 0,
33 url: getURL('requestOpenTab/a.html') }}, 36 url: getURL('requestOpenTab/a.html') }},
34 { label: "a-onCompleted", 37 { label: "a-onCompleted",
35 event: "onCompleted", 38 event: "onCompleted",
36 details: { frameId: 0, 39 details: { frameId: 0,
40 processId: 0,
37 tabId: 0, 41 tabId: 0,
38 timeStamp: 0, 42 timeStamp: 0,
39 url: getURL('requestOpenTab/a.html') }}, 43 url: getURL('requestOpenTab/a.html') }},
40 { label: "b-onCreatedNavigationTarget", 44 { label: "b-onCreatedNavigationTarget",
41 event: "onCreatedNavigationTarget", 45 event: "onCreatedNavigationTarget",
42 details: { sourceFrameId: 0, 46 details: { sourceFrameId: 0,
47 sourceProcessId: 0,
43 sourceTabId: 0, 48 sourceTabId: 0,
44 tabId: 1, 49 tabId: 1,
45 timeStamp: 0, 50 timeStamp: 0,
46 url: getURL('requestOpenTab/b.html') }}, 51 url: getURL('requestOpenTab/b.html') }},
47 { label: "b-onBeforeNavigate", 52 { label: "b-onBeforeNavigate",
48 event: "onBeforeNavigate", 53 event: "onBeforeNavigate",
49 details: { frameId: 0, 54 details: { frameId: 0,
55 processId: 0,
50 tabId: 1, 56 tabId: 1,
51 timeStamp: 0, 57 timeStamp: 0,
52 url: getURL('requestOpenTab/b.html') }}, 58 url: getURL('requestOpenTab/b.html') }},
53 { label: "b-onCommitted", 59 { label: "b-onCommitted",
54 event: "onCommitted", 60 event: "onCommitted",
55 details: { frameId: 0, 61 details: { frameId: 0,
62 processId: 0,
56 tabId: 1, 63 tabId: 1,
57 timeStamp: 0, 64 timeStamp: 0,
58 transitionQualifiers: [], 65 transitionQualifiers: [],
59 transitionType: "link", 66 transitionType: "link",
60 url: getURL('requestOpenTab/b.html') }}, 67 url: getURL('requestOpenTab/b.html') }},
61 { label: "b-onDOMContentLoaded", 68 { label: "b-onDOMContentLoaded",
62 event: "onDOMContentLoaded", 69 event: "onDOMContentLoaded",
63 details: { frameId: 0, 70 details: { frameId: 0,
71 processId: 0,
64 tabId: 1, 72 tabId: 1,
65 timeStamp: 0, 73 timeStamp: 0,
66 url: getURL('requestOpenTab/b.html') }}, 74 url: getURL('requestOpenTab/b.html') }},
67 { label: "b-onCompleted", 75 { label: "b-onCompleted",
68 event: "onCompleted", 76 event: "onCompleted",
69 details: { frameId: 0, 77 details: { frameId: 0,
78 processId: 0,
70 tabId: 1, 79 tabId: 1,
71 timeStamp: 0, 80 timeStamp: 0,
72 url: getURL('requestOpenTab/b.html') }}], 81 url: getURL('requestOpenTab/b.html') }}],
73 [ navigationOrder("a-"), 82 [ navigationOrder("a-"),
74 navigationOrder("b-"), 83 navigationOrder("b-"),
75 [ "a-onDOMContentLoaded", 84 [ "a-onDOMContentLoaded",
76 "b-onCreatedNavigationTarget", 85 "b-onCreatedNavigationTarget",
77 "b-onBeforeNavigate" ]]); 86 "b-onBeforeNavigate" ]]);
78 87
79 // Notify the api test that we're waiting for the user. 88 // Notify the api test that we're waiting for the user.
80 chrome.test.notifyPass(); 89 chrome.test.notifyPass();
81 }, 90 },
82 ]); 91 ]);
83 }); 92 });
84 } 93 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698