OLD | NEW |
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include <windows.h> | 5 #include <windows.h> |
6 #include <string> | 6 #include <string> |
7 | 7 |
8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
9 #include "chrome/common/chrome_switches.h" | 9 #include "chrome/common/chrome_switches.h" |
10 #include "chrome/test/ui/ui_test.h" | 10 #include "chrome/test/ui/ui_test.h" |
11 #include "testing/gtest/include/gtest/gtest.h" | 11 #include "testing/gtest/include/gtest/gtest.h" |
12 | 12 |
13 class SandboxTest : public UITest { | 13 class SandboxTest : public UITest { |
14 protected: | 14 protected: |
15 // Launches chrome with the --test-sandbox=security_tests.dll flag. | 15 // Launches chrome with the --test-sandbox=security_tests.dll flag. |
16 SandboxTest() : UITest() { | 16 SandboxTest() : UITest() { |
17 CommandLine::AppendSwitchWithValue(&launch_arguments_, | 17 launch_arguments_.AppendSwitchWithValue(switches::kTestSandbox, |
18 switches::kTestSandbox, | 18 L"security_tests.dll"); |
19 L"security_tests.dll"); | |
20 } | 19 } |
21 }; | 20 }; |
22 | 21 |
23 // Verifies that chrome is running properly. | 22 // Verifies that chrome is running properly. |
24 TEST_F(SandboxTest, ExecuteDll) { | 23 TEST_F(SandboxTest, ExecuteDll) { |
25 EXPECT_EQ(1, GetTabCount()); | 24 EXPECT_EQ(1, GetTabCount()); |
26 } | 25 } |
27 | 26 |
OLD | NEW |