summaryrefslogtreecommitdiffstats
path: root/extensions/shell/browser/shell_nacl_browser_delegate_unittest.cc
blob: 0e1d17846cbe823ab1a497fb798f9fdf2d3651d0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
// Copyright 2014 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 "extensions/shell/browser/shell_nacl_browser_delegate.h"

#include "base/strings/pattern.h"
#include "base/strings/string_util.h"
#include "content/public/test/test_browser_context.h"
#include "testing/gtest/include/gtest/gtest.h"

namespace extensions {

typedef testing::Test ShellNaClBrowserDelegateTest;

// Verifies that the returned version string has a valid format.
TEST_F(ShellNaClBrowserDelegateTest, VersionString) {
  content::TestBrowserContext browser_context;
  ShellNaClBrowserDelegate delegate(&browser_context);

  // Version should look like "1.2.3.4 (5)".
  std::string version = delegate.GetVersionString();
  EXPECT_TRUE(base::MatchPattern(version, "*.*.*.* (*)")) << "bad version "
                                                          << version;
}

}  // namespace extensions