Commit 72c4a4aa authored by Tommy Li's avatar Tommy Li Committed by Chromium LUCI CQ

[search_engines] Sync unit test: Update test GUIDs to form "guid1"

Previously, we were using "key1", "key2", etc. as the GUIDs for our
test engines.

This was confusing, because "key1", etc. was also used for the keywords
to our test engines.

For clarity, we've changed all GUIDs of the form "key1" to "guid1",
and added a DCHECK to warn developers not to do it again.

No functional changes here, just a simple rename of constants in our
test files.

Bug: 1022775
Change-Id: I776feb17190942fc23e4c5a5d669bc0dbfec537b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2573339
Commit-Queue: Tommy Li <tommycli@chromium.org>
Reviewed-by: default avatarMikel Astiz <mastiz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#833797}
parent cb84636c
......@@ -8,6 +8,7 @@
#include "base/macros.h"
#include "base/run_loop.h"
#include "base/strings/string_util.h"
#include "base/test/bind.h"
#include "base/threading/thread_task_runner_handle.h"
#include "base/time/time.h"
......@@ -71,6 +72,10 @@ std::unique_ptr<TemplateURL> CreateTestTemplateURL(
bool safe_for_autoreplace,
bool created_by_policy,
int prepopulate_id) {
DCHECK(!base::StartsWith(guid, "key"))
<< "Don't use test GUIDs with the form \"key1\". Use \"guid1\" instead "
"for clarity.";
TemplateURLData data;
data.SetShortName(base::ASCIIToUTF16("unittest"));
data.SetKeyword(keyword);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment