summaryrefslogtreecommitdiffstats
path: root/chrome/common/extensions/extension_test_util.cc
blob: 31f3af255a03f434d2b9285f9c1ad6206258dbd9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
// Copyright (c) 2011 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/common/extensions/extension.h"
#include "chrome/common/extensions/extension_test_util.h"
#include "testing/gtest/include/gtest/gtest.h"

namespace extension_test_util {

std::string MakeId(std::string seed) {
  std::string result;
  bool success = Extension::GenerateId(seed, &result);
  EXPECT_TRUE(success);
  EXPECT_FALSE(result.empty());
  EXPECT_TRUE(Extension::IdIsValid(result));
  return result;
}

}  // namespace extension_test_util