Pin Chrome's shortcut to the Win10 Start menu on install and OS upgrade.
[chromium-blink-merge.git] / chrome / test / data / extensions / api_test / webnavigation / referenceFragment / test_referenceFragment.js
blob201dd7eecda912564db34fa8f604f9f0ca43cdfb
1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 onload = function() {
6 var getURL = chrome.extension.getURL;
7 chrome.tabs.create({"url": "about:blank"}, function(tab) {
8 var tabId = tab.id;
10 chrome.test.runTests([
11 // Reference fragment navigation.
12 function referenceFragment() {
13 expect([
14 { label: "a-onBeforeNavigate",
15 event: "onBeforeNavigate",
16 details: { frameId: 0,
17 parentFrameId: -1,
18 processId: 0,
19 tabId: 0,
20 timeStamp: 0,
21 url: getURL('a.html') }},
22 { label: "a-onCommitted",
23 event: "onCommitted",
24 details: { frameId: 0,
25 processId: 0,
26 tabId: 0,
27 timeStamp: 0,
28 transitionQualifiers: [],
29 transitionType: "link",
30 url: getURL('a.html') }},
31 { label: "a-onDOMContentLoaded",
32 event: "onDOMContentLoaded",
33 details: { frameId: 0,
34 processId: 0,
35 tabId: 0,
36 timeStamp: 0,
37 url: getURL('a.html') }},
38 { label: "a-onCompleted",
39 event: "onCompleted",
40 details: { frameId: 0,
41 processId: 0,
42 tabId: 0,
43 timeStamp: 0,
44 url: getURL('a.html#anchor') }},
45 { label: "a-onReferenceFragmentUpdated",
46 event: "onReferenceFragmentUpdated",
47 details: { frameId: 0,
48 processId: 0,
49 tabId: 0,
50 timeStamp: 0,
51 transitionQualifiers: ["client_redirect"],
52 transitionType: "link",
53 url: getURL('a.html#anchor') }}],
54 [ navigationOrder("a-") ]);
55 chrome.tabs.update(tabId, { url: getURL('a.html') });
57 ]);
58 });