• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Copyright 2020 The Chromium Authors
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4 
5 package org.chromium.url;
6 
7 import org.chromium.base.annotations.CalledByNative;
8 import org.chromium.base.annotations.JNINamespace;
9 import org.chromium.base.annotations.NativeMethods;
10 
11 /**
12  * Helpers for GURLJavaTest that need to call into native code.
13  */
14 @JNINamespace("url")
15 public class GURLJavaTestHelper {
16     @CalledByNative
createGURL(String uri)17     public static GURL createGURL(String uri) {
18         return new GURL(uri);
19     }
20 
nativeInitializeICU()21     public static void nativeInitializeICU() {
22         GURLJavaTestHelperJni.get().initializeICU();
23     }
24 
nativeTestGURLEquivalence()25     public static void nativeTestGURLEquivalence() {
26         GURLJavaTestHelperJni.get().testGURLEquivalence();
27     }
28 
29     @NativeMethods
30     interface Natives {
initializeICU()31         void initializeICU();
testGURLEquivalence()32         void testGURLEquivalence();
33     }
34 }
35