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

Unified Diff: chrome/browser/automation/testing_automation_provider.cc

Issue 10406029: Implement positive test for Address Sanitizer in Chrome (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 7 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
Index: chrome/browser/automation/testing_automation_provider.cc
diff --git a/chrome/browser/automation/testing_automation_provider.cc b/chrome/browser/automation/testing_automation_provider.cc
index c9178c5666589265e4d3b0956db8dd28768cee23..418ab50aa640e37d765537a4d54fdac5856bc5ba 100644
--- a/chrome/browser/automation/testing_automation_provider.cc
+++ b/chrome/browser/automation/testing_automation_provider.cc
@@ -2258,6 +2258,8 @@ void TestingAutomationProvider::SendJSONRequest(int handle,
&TestingAutomationProvider::OverrideGeoposition;
handler_map["AppendSwitchASCIIToCommandLine"] =
&TestingAutomationProvider::AppendSwitchASCIIToCommandLine;
+ handler_map["SimulateAsanMemoryBug"] =
+ &TestingAutomationProvider::SimulateAsanMemoryBug;
#if defined(OS_CHROMEOS)
handler_map["GetLoginInfo"] = &TestingAutomationProvider::GetLoginInfo;
@@ -6383,6 +6385,17 @@ void TestingAutomationProvider::RefreshPolicies(
#endif
}
+static int AccessArray(const int arr[], int index) {
+ return arr[index];
+}
+
+void TestingAutomationProvider::SimulateAsanMemoryBug(
+ base::DictionaryValue* args, IPC::Message* reply_message) {
+ int testarray[41];
+ AccessArray(testarray, 42);
+ AutomationJSONReply(this, reply_message).SendSuccess(NULL);
+}
+
void TestingAutomationProvider::GetIndicesFromTab(
DictionaryValue* args,
IPC::Message* reply_message) {

Powered by Google App Engine
This is Rietveld 408576698