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

Side by Side Diff: chrome/test/data/extensions/api_test/proxy/events/parse_error.html

Issue 8757010: Move another block of extension tests to manifest_version 2 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years 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 <!--
2 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 2 * Copyright (c) 2011 The Chromium Authors. All rights reserved. Use of this
3 // Use of this source code is governed by a BSD-style license that can be 3 * source code is governed by a BSD-style license that can be found in the
4 // found in the LICENSE file. 4 * LICENSE file.
5 5 -->
6 // proxy api test 6 <script src="parse_error.js"></script>
7 // browser_tests.exe --gtest_filter=ProxySettingsApiTest.ProxyEventsParseError
8
9 var expected_error = {
10 error: "net::ERR_PAC_SCRIPT_FAILED",
11 details: "line: 1: Uncaught SyntaxError: Unexpected token !",
12 fatal: false
13 };
14
15 function test() {
16 // Install error handler and get the test server config.
17 chrome.proxy.onProxyError.addListener(function (error) {
18 chrome.test.assertEq(expected_error, error);
19 chrome.test.notifyPass();
20 });
21
22 // Set an invalid PAC script. This should trigger a proxy errors.
23 var config = {
24 mode: "pac_script",
25 pacScript: {
26 data: "trash!",
27 mandatory: false
28 }
29 };
30 chrome.proxy.settings.set({'value': config}, testDone);
31 }
32
33 function testDone() {
34 // Do nothing. The test success/failure is decided in the event handler.
35 }
36
37 test();
38 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698