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

Unified Diff: chrome/test/ppapi/ppapi_interactive_browsertest.cc

Issue 10699045: Fix PPB_MouseLock.LockMouse crash and add tests. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 5 months 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/test/ppapi/ppapi_browsertest.cc ('k') | chrome/test/ppapi/ppapi_test.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/ppapi/ppapi_interactive_browsertest.cc
===================================================================
--- chrome/test/ppapi/ppapi_interactive_browsertest.cc (revision 0)
+++ chrome/test/ppapi/ppapi_interactive_browsertest.cc (revision 0)
@@ -0,0 +1,41 @@
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "chrome/test/ppapi/ppapi_test.h"
+
+#include "build/build_config.h"
+#include "chrome/browser/content_settings/host_content_settings_map.h"
+#include "chrome/browser/profiles/profile.h"
+#include "chrome/browser/ui/browser.h"
+
+//
+// Interface tests.
+//
+
+// Disable tests under ASAN. http://crbug.com/104832.
+// This is a bit heavy handed, but the majority of these tests fail under ASAN.
+// See bug for history.
+#if !defined(ADDRESS_SANITIZER)
+
+IN_PROC_BROWSER_TEST_F(OutOfProcessPPAPITest, MouseLock_SucceedWhenAllowed) {
+ HostContentSettingsMap* settings_map =
+ browser()->profile()->GetHostContentSettingsMap();
+
+ settings_map->SetDefaultContentSetting(CONTENT_SETTINGS_TYPE_MOUSELOCK,
+ CONTENT_SETTING_ALLOW);
+
+ RunTestViaHTTP("MouseLock_SucceedWhenAllowed");
+}
+
+IN_PROC_BROWSER_TEST_F(OutOfProcessPPAPITest, MouseLock_FailWhenBlocked) {
+ HostContentSettingsMap* settings_map =
+ browser()->profile()->GetHostContentSettingsMap();
+
+ settings_map->SetDefaultContentSetting(CONTENT_SETTINGS_TYPE_MOUSELOCK,
+ CONTENT_SETTING_BLOCK);
+
+ RunTestViaHTTP("MouseLock_FailWhenBlocked");
+}
+
+#endif // ADDRESS_SANITIZER
Property changes on: chrome/test/ppapi/ppapi_interactive_browsertest.cc
___________________________________________________________________
Added: svn:eol-style
+ LF
« no previous file with comments | « chrome/test/ppapi/ppapi_browsertest.cc ('k') | chrome/test/ppapi/ppapi_test.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698