summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-04-15 01:22:29 +0000
committertfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-04-15 01:22:29 +0000
commitecf0d741e872e23ab4352cc0d3b43d913a5b7a15 (patch)
treeb3f4408aff5352d985c8b7c07fe006bd36575016
parent7a2e2e4ebf2c68021d0087b4ad6419de5f2ca3e4 (diff)
downloadchromium_src-ecf0d741e872e23ab4352cc0d3b43d913a5b7a15.zip
chromium_src-ecf0d741e872e23ab4352cc0d3b43d913a5b7a15.tar.gz
chromium_src-ecf0d741e872e23ab4352cc0d3b43d913a5b7a15.tar.bz2
url: Remove using namespace declaration from url_parse_unittests.cc
Instead we wrap the entire file under namespace url_parse and the unnamed namespace, to be compliant with the ODR. BUG=82078 TEST=googleurl_unittests TBR=brettw@chromium.org Review URL: https://codereview.chromium.org/14243002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@194130 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--url/url_parse_unittest.cc15
1 files changed, 8 insertions, 7 deletions
diff --git a/url/url_parse_unittest.cc b/url/url_parse_unittest.cc
index 7293d23..dc23ef1 100644
--- a/url/url_parse_unittest.cc
+++ b/url/url_parse_unittest.cc
@@ -27,9 +27,10 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+#include "url/url_parse.h"
+
#include "base/basictypes.h"
#include "testing/gtest/include/gtest/gtest.h"
-#include "url/url_parse.h"
// Some implementations of base/basictypes.h may define ARRAYSIZE.
// If it's not defined, we define it to the ARRAYSIZE_UNSAFE macro
@@ -68,6 +69,7 @@
// it looks like an absolute drive path. Also, slashes and backslashes are
// equally valid here.
+namespace url_parse {
namespace {
// Used for regular URL parse cases.
@@ -143,8 +145,6 @@ void ExpectInvalidComponent(const url_parse::Component& component) {
EXPECT_EQ(-1, component.len);
}
-} // namespace
-
// Parsed ----------------------------------------------------------------------
TEST(URLParser, Length) {
@@ -177,16 +177,15 @@ TEST(URLParser, Length) {
}
TEST(URLParser, CountCharactersBefore) {
- using namespace url_parse;
struct CountCase {
const char* url;
Parsed::ComponentType component;
bool include_delimiter;
int expected_count;
} count_cases[] = {
- // Test each possibility in the case where all components are present.
-// 0 1 2
-// 0123456789012345678901
+ // Test each possibility in the case where all components are present.
+ // 0 1 2
+ // 0123456789012345678901
{"http://u:p@h:8/p?q#r", Parsed::SCHEME, true, 0},
{"http://u:p@h:8/p?q#r", Parsed::SCHEME, false, 0},
{"http://u:p@h:8/p?q#r", Parsed::USERNAME, true, 7},
@@ -647,3 +646,5 @@ TEST(URLParser, FileSystemURL) {
}
}
+} // namespace
+} // namespace url_parse