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
3 // found in the LICENSE file.
6 // browser_tests.exe --gtest_filter=ProxySettingsApiTest.ProxyPacDataUrl
9 // Verify that execution has started to make sure flaky timeouts are not
11 function verifyTestsHaveStarted() {
12 chrome
.test
.succeed();
14 function setAutoSettings() {
15 var kExpectedPacScript
=
16 "function FindProxyForURL(url, host) {\n" +
17 " if (host == 'foobar.com')\n" +
18 " return 'PROXY blackhole:80';\n" +
19 " return 'DIRECT';\n" +
21 var pacScriptObject
= {
22 url
: "data:;base64,ZnVuY3Rpb24gRmluZFByb3h5Rm9yVVJMKHVybCwgaG9zdCkgewo" +
23 "gIGlmIChob3N0ID09ICdmb29iYXIuY29tJykKICAgIHJldHVybiAnUFJPWFkgYmx" +
24 "hY2tob2xlOjgwJzsKICByZXR1cm4gJ0RJUkVDVCc7Cn0="
28 pacScript
: pacScriptObject
30 chrome
.proxy
.settings
.set(
33 chrome
.proxy
.settings
.get(
36 chrome
.test
.assertEq(kExpectedPacScript
,
37 config
.value
.pacScript
.data
);
38 chrome
.test
.succeed();