OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/strings/string_number_conversions.h" | 5 #include "base/strings/string_number_conversions.h" |
6 #include "base/strings/utf_string_conversions.h" | 6 #include "base/strings/utf_string_conversions.h" |
7 #include "content/public/browser/browser_context.h" | 7 #include "content/public/browser/browser_context.h" |
8 #include "content/public/browser/download_manager.h" | 8 #include "content/public/browser/download_manager.h" |
9 #include "content/public/browser/notification_service.h" | 9 #include "content/public/browser/notification_service.h" |
10 #include "content/public/browser/notification_types.h" | 10 #include "content/public/browser/notification_types.h" |
(...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
247 IN_PROC_BROWSER_TEST_F(DatabaseTest, ModificationsPersistAfterRendererCrash) { | 247 IN_PROC_BROWSER_TEST_F(DatabaseTest, ModificationsPersistAfterRendererCrash) { |
248 Navigate(shell()); | 248 Navigate(shell()); |
249 CreateTable(shell()); | 249 CreateTable(shell()); |
250 InsertRecord(shell(), "1"); | 250 InsertRecord(shell(), "1"); |
251 | 251 |
252 CrashTab(shell()->web_contents()); | 252 CrashTab(shell()->web_contents()); |
253 Navigate(shell()); | 253 Navigate(shell()); |
254 CompareRecords(shell(), "1"); | 254 CompareRecords(shell(), "1"); |
255 } | 255 } |
256 | 256 |
| 257 // Verify database modifications persist after crashing window. |
| 258 IN_PROC_BROWSER_TEST_F(DatabaseTest, CrashOnly) { |
| 259 Navigate(shell()); |
| 260 CrashTab(shell()->web_contents()); |
| 261 } |
| 262 |
257 // Test to check if database modifications are persistent across windows in | 263 // Test to check if database modifications are persistent across windows in |
258 // off the record window. | 264 // off the record window. |
259 IN_PROC_BROWSER_TEST_F(DatabaseTest, OffTheRecordDBPersistentAcrossWindows) { | 265 IN_PROC_BROWSER_TEST_F(DatabaseTest, OffTheRecordDBPersistentAcrossWindows) { |
260 Shell* otr1 = CreateOffTheRecordBrowser(); | 266 Shell* otr1 = CreateOffTheRecordBrowser(); |
261 Navigate(otr1); | 267 Navigate(otr1); |
262 CreateTable(otr1); | 268 CreateTable(otr1); |
263 InsertRecord(otr1, "text"); | 269 InsertRecord(otr1, "text"); |
264 | 270 |
265 Shell* otr2 = CreateOffTheRecordBrowser(); | 271 Shell* otr2 = CreateOffTheRecordBrowser(); |
266 Navigate(otr2); | 272 Navigate(otr2); |
267 CompareRecords(otr2, "text"); | 273 CompareRecords(otr2, "text"); |
268 } | 274 } |
269 | 275 |
270 } // namespace content | 276 } // namespace content |
OLD | NEW |