- add sources.
[platform/framework/web/crosswalk.git] / src / chrome / test / data / extensions / api_test / content_scripts / fragment / content_script.js
1 // Copyright (c) 2010 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.
4
5 // Tests that we don't re-inject scripts after fragment navigation.
6
7 // The background page should only see this once - it will then use tab.update
8 // to navigate this page to #foo.
9 chrome.extension.sendRequest("content_script_start");
10
11 if (location.href.indexOf("#foo") != -1) {
12   // This means the content script ran again.
13   chrome.extension.sendRequest("fail");
14 }