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

Side by Side Diff: sandbox/src/unload_dll_test.cc

Issue 4135007: Add a bunch of missing bug references to FLAKY tests (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add TODO Created 10 years, 1 month 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
« no previous file with comments | « net/socket/ssl_client_socket_unittest.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 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 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 "base/scoped_handle_win.h" 5 #include "base/scoped_handle_win.h"
6 #include "testing/gtest/include/gtest/gtest.h" 6 #include "testing/gtest/include/gtest/gtest.h"
7 #include "sandbox/src/sandbox.h" 7 #include "sandbox/src/sandbox.h"
8 #include "sandbox/src/sandbox_factory.h" 8 #include "sandbox/src/sandbox_factory.h"
9 #include "sandbox/src/target_services.h" 9 #include "sandbox/src/target_services.h"
10 #include "sandbox/tests/common/controller.h" 10 #include "sandbox/tests/common/controller.h"
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 TEST(UnloadDllTest, UnloadAviCapDllNoPatching) { 58 TEST(UnloadDllTest, UnloadAviCapDllNoPatching) {
59 TestRunner runner; 59 TestRunner runner;
60 runner.SetTestState(BEFORE_REVERT); 60 runner.SetTestState(BEFORE_REVERT);
61 runner.SetTimeout(2000); 61 runner.SetTimeout(2000);
62 sandbox::TargetPolicy* policy = runner.GetPolicy(); 62 sandbox::TargetPolicy* policy = runner.GetPolicy();
63 policy->AddDllToUnload(L"avicap32.dll"); 63 policy->AddDllToUnload(L"avicap32.dll");
64 EXPECT_EQ(SBOX_TEST_FAILED, runner.RunTest(L"UseOneDLL L avicap32.dll")); 64 EXPECT_EQ(SBOX_TEST_FAILED, runner.RunTest(L"UseOneDLL L avicap32.dll"));
65 EXPECT_EQ(SBOX_TEST_FAILED, runner.RunTest(L"UseOneDLL B avicap32.dll")); 65 EXPECT_EQ(SBOX_TEST_FAILED, runner.RunTest(L"UseOneDLL B avicap32.dll"));
66 } 66 }
67 67
68 // Flaky: http://crbug.com/38404
68 TEST(UnloadDllTest, FLAKY_UnloadAviCapDllWithPatching) { 69 TEST(UnloadDllTest, FLAKY_UnloadAviCapDllWithPatching) {
69 TestRunner runner; 70 TestRunner runner;
70 runner.SetTimeout(2000); 71 runner.SetTimeout(2000);
71 runner.SetTestState(BEFORE_REVERT); 72 runner.SetTestState(BEFORE_REVERT);
72 sandbox::TargetPolicy* policy = runner.GetPolicy(); 73 sandbox::TargetPolicy* policy = runner.GetPolicy();
73 policy->AddDllToUnload(L"avicap32.dll"); 74 policy->AddDllToUnload(L"avicap32.dll");
74 75
75 ScopedHandle handle1(::CreateEvent(NULL, FALSE, FALSE, L"tst0001")); 76 ScopedHandle handle1(::CreateEvent(NULL, FALSE, FALSE, L"tst0001"));
76 77
77 // Add a couple of rules that ensures that the interception agent add EAT 78 // Add a couple of rules that ensures that the interception agent add EAT
78 // patching on the client which makes sure that the unload dll record does 79 // patching on the client which makes sure that the unload dll record does
79 // not interact badly with them. 80 // not interact badly with them.
80 EXPECT_TRUE(runner.AddRule(TargetPolicy::SUBSYS_REGISTRY, 81 EXPECT_TRUE(runner.AddRule(TargetPolicy::SUBSYS_REGISTRY,
81 TargetPolicy::REG_ALLOW_ANY, 82 TargetPolicy::REG_ALLOW_ANY,
82 L"HKEY_LOCAL_MACHINE\\Software\\Microsoft")); 83 L"HKEY_LOCAL_MACHINE\\Software\\Microsoft"));
83 EXPECT_TRUE(runner.AddRule(TargetPolicy::SUBSYS_SYNC, 84 EXPECT_TRUE(runner.AddRule(TargetPolicy::SUBSYS_SYNC,
84 TargetPolicy::EVENTS_ALLOW_ANY, L"tst0001")); 85 TargetPolicy::EVENTS_ALLOW_ANY, L"tst0001"));
85 86
86 EXPECT_EQ(SBOX_TEST_FAILED, runner.RunTest(L"UseOneDLL L avicap32.dll")); 87 EXPECT_EQ(SBOX_TEST_FAILED, runner.RunTest(L"UseOneDLL L avicap32.dll"));
87 88
88 runner.SetTestState(AFTER_REVERT); 89 runner.SetTestState(AFTER_REVERT);
89 EXPECT_EQ(SBOX_TEST_SUCCEEDED, runner.RunTest(L"SimpleOpenEvent tst0001")); 90 EXPECT_EQ(SBOX_TEST_SUCCEEDED, runner.RunTest(L"SimpleOpenEvent tst0001"));
90 } 91 }
91 92
92 } // namespace sandbox 93 } // namespace sandbox
OLDNEW
« no previous file with comments | « net/socket/ssl_client_socket_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698