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

Unified Diff: chrome/test/data/extensions/api_test/webnavigation/test_history.js

Issue 10704225: Send an webNavigation event for navigations triggered by window.history (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 side-by-side diff with in-line comments
Download patch
Index: chrome/test/data/extensions/api_test/webnavigation/test_history.js
diff --git a/chrome/test/data/extensions/api_test/webnavigation/test_referenceFragment.js b/chrome/test/data/extensions/api_test/webnavigation/test_history.js
similarity index 67%
copy from chrome/test/data/extensions/api_test/webnavigation/test_referenceFragment.js
copy to chrome/test/data/extensions/api_test/webnavigation/test_history.js
index 96a5a71748c7b87b7163009e1c2ee927211a6c2a..201eceb26e3509a01f79b64dbd41e83e30773fc7 100644
--- a/chrome/test/data/extensions/api_test/webnavigation/test_referenceFragment.js
+++ b/chrome/test/data/extensions/api_test/webnavigation/test_history.js
@@ -1,4 +1,4 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -8,15 +8,15 @@ function runTests() {
var tabId = tab.id;
chrome.test.runTests([
- // Reference fragment navigation.
- function referenceFragment() {
+ // History manipulation via window.history
+ function history() {
expect([
{ label: "a-onBeforeNavigate",
event: "onBeforeNavigate",
details: { frameId: 0,
tabId: 0,
timeStamp: 0,
- url: getURL('referenceFragment/a.html') }},
+ url: getURL('history/a.html') }},
{ label: "a-onCommitted",
event: "onCommitted",
details: { frameId: 0,
@@ -24,29 +24,29 @@ function runTests() {
timeStamp: 0,
transitionQualifiers: [],
transitionType: "link",
- url: getURL('referenceFragment/a.html') }},
+ url: getURL('history/a.html') }},
{ label: "a-onDOMContentLoaded",
event: "onDOMContentLoaded",
details: { frameId: 0,
tabId: 0,
timeStamp: 0,
- url: getURL('referenceFragment/a.html') }},
+ url: getURL('history/a.html') }},
{ label: "a-onCompleted",
event: "onCompleted",
details: { frameId: 0,
tabId: 0,
timeStamp: 0,
- url: getURL('referenceFragment/a.html#anchor') }},
- { label: "a-onReferenceFragmentUpdated",
- event: "onReferenceFragmentUpdated",
+ url: getURL('history/b.html') }},
+ { label: "a-onHistoryStateUpdated",
+ event: "onHistoryStateUpdated",
details: { frameId: 0,
tabId: 0,
timeStamp: 0,
transitionQualifiers: ["client_redirect"],
transitionType: "link",
- url: getURL('referenceFragment/a.html#anchor') }}],
+ url: getURL('history/b.html') }}],
[ navigationOrder("a-") ]);
- chrome.tabs.update(tabId, { url: getURL('referenceFragment/a.html') });
+ chrome.tabs.update(tabId, { url: getURL('history/a.html') });
},
]);
});

Powered by Google App Engine
This is Rietveld 408576698