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

Unified Diff: chrome/android/javatests/src/org/chromium/chrome/browser/tabmodel/TestTabModelDirectory.java

Issue 2166123002: Ignore tabs with duplicate IDs when merging tab models on cold start (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 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/android/javatests/src/org/chromium/chrome/browser/tabmodel/TabPersistentStoreTest.java ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/android/javatests/src/org/chromium/chrome/browser/tabmodel/TestTabModelDirectory.java
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/tabmodel/TestTabModelDirectory.java b/chrome/android/javatests/src/org/chromium/chrome/browser/tabmodel/TestTabModelDirectory.java
index 008091fc898e254cd42b054f0143196cb0c997be..5dd45f96479e7c220f8a9186404e637cc02bf19c 100644
--- a/chrome/android/javatests/src/org/chromium/chrome/browser/tabmodel/TestTabModelDirectory.java
+++ b/chrome/android/javatests/src/org/chromium/chrome/browser/tabmodel/TestTabModelDirectory.java
@@ -339,12 +339,22 @@ public class TestTabModelDirectory {
}
/**
+ * Calls the three-param version of this method with index = 0.
+ */
+ public void writeTabModelFiles(TabModelMetaDataInfo info, boolean writeTabStates)
+ throws Exception {
+ writeTabModelFiles(info, writeTabStates, 0);
+ }
+
+ /**
* Writes out data required to restore a TabModel to the data directories.
+ * @param info The info to write to the tab metadata file.
* @param writeTabStates Whether or not to write the TabState files for each of the Tabs out.
+ * @param index The TabModelSelectorIndex to write the metadata file for.
*/
- public void writeTabModelFiles(TabModelMetaDataInfo info, boolean writeTabStates)
+ public void writeTabModelFiles(TabModelMetaDataInfo info, boolean writeTabStates, int index)
throws Exception {
- writeFile(mDataDirectory, "tab_state0", info.encodedFile);
+ writeFile(mDataDirectory, "tab_state" + Integer.toString(index), info.encodedFile);
for (TabStateInfo tabStateInfo : info.contents) {
writeTabStateFile(tabStateInfo);
}
« no previous file with comments | « chrome/android/javatests/src/org/chromium/chrome/browser/tabmodel/TabPersistentStoreTest.java ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698